<template>
  <div class="list_container">
    <div class="list">
      <div class="list_item" @tap="toDetail">
        <!-- 日期 -->
        <div class="list_time">
          <img
            src="http://e.hiphotos.baidu.com/image/h%3D300/sign=a9e671b9a551f3dedcb2bf64a4eff0ec/4610b912c8fcc3cef70d70409845d688d53f20f7.jpg"
            alt=""
          >
          <span>{{ item.data }}</span>
        </div>
        <h3 class="title">{{item.title}}</h3>
        <img class="main" :src="item.detail_img" alt="">
        <div class="category">
          <ul>
            <li>
              <a href="javascript:;">Java</a>
              <span>/</span>
            </li>
            <li>
              <a href="javascript:;">Java</a>
              <span>/</span>
            </li>
            <li>
              <a href="javascript:;">Java</a>
              <span>/</span>
            </li>
            <li>
              <a href="javascript:;">Java</a>
              <span>/</span>
            </li>
            <li>
              <a href="javascript:;">Java</a>
              <span>/</span>
            </li>
          </ul>
        </div>
        <p class="content">{{item.detail_content}}</p>
        <!-- 底部 -->
        <div class="list_bottom">
          <span>⭐</span>
          <span>{{item.love_count}}</span>
          <span>👀</span>
          <span>{{item.attention_count}}</span>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  methods: {
    toDetail() {
      wx.navigateTo({
        url: "/pages/detail/main?index="+this.index
      });
    }
  },
  props: ["item", "index"]
};
</script>

<style scoped>
.list_container {
  margin-top: 20rpx;
}
.list_item {
  padding: 20rpx 0;
  border-top: 1rpx solid #ccc;
}
.list_time {
  display: flex;
  align-items: center;
}
.list_time img {
  margin: 20rpx;
  width: 60rpx;
  height: 60rpx;
  border-radius: 50%;
}
.title {
  font-size: 40 rpx;
  font-weight: 700;
}
.list_item .main {
  width: 100%;
  vertical-align: middle;
}
.category ul {
  display: flex;
  flex-direction: row;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
}
.category ul li {
  display: flex;
  /* margin: 0 20rpx; */
}
.category ul li span {
  margin: 0 10rpx;
}
.category ul li:last-child span {
  display: none;
}
.content {
  text-indent: 2em;
  color: #666;
}
.list_bottom {
  margin-top: 20rpx;
}
.list_bottom span {
  margin-right: 10rpx;
  font-size: 28rpx;
}
</style>

